/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Model;

import java.awt.Image;
import java.io.IOException;
import javax.lang.model.element.Element;
import javax.xml.parsers.*;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;

/**
 *
 * @author Daniel
 */
public class NPC extends Mob {
    private Dialog dialog;
    public NPC() {
        super(0,0,0,0,0, null, null);
    }

    public NPC(double x, double y, int health, int magic, int attack, Item[] inv, Image skin) {
        super(x, y, health, magic, attack, inv, skin);
    }
    //read file .xml
    public void load_Dialogs(String filename) {
        if(!filename.endsWith(".xml")){
            System.err.println("Error to load dialog, filename: " + filename);
            return;
        }
        //parseXmlFile
        /*DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
        Document doc = null;
        try {
                //Using factory get an instance of document builder
                DocumentBuilder db = dbf.newDocumentBuilder();

                //parse using builder to get DOM representation of the XML file
                doc = db.parse(filename);

        }catch(ParserConfigurationException pce) {
        }catch(SAXException se) {
        }catch(IOException ioe) {
        }//***************************************************
        
        //parseDocument
        Element docEle = (Element) doc.getDocumentElement();
       
       
        if(nl != null && nl.getLength() > 0) {
                for(int i = 0 ; i < nl.getLength();i++) {

                        //get the employee element
                        Element el = (Element)nl.item(i);

                        //get the Employee object
                        Employee e = getEmployee(el);

                        //add it to list
                        myEmpls.add(e);
                }
        }*/

        //***************************************************
    }
    
    public static void main(String[] args){
        NPC npc = new NPC();
        npc.load_Dialogs("../dialogs/example.xml");
    }
}
